<%@ page 
import="dk.itu.iwjx.beans.*"
errorPage="global/error.jsp" 
import="java.util.*"
import ="dk.itu.iwjx.helper.*"
%>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -->
<title>Show Pizza</title>
    <link type="text/css" href="asset/css/style.css" rel="Stylesheet" />
</head>
<body>
<div id="wrapper">
	<div id="header">
		<div id="logo">
		
		</div>
		
			<div id="navi">
			<a href="index.jsp">Home</a>
			<a href="#">Pizza</a>
			<a href="#">Chat</a>
			<a href="#">About Us</a>
			</div>
		
	
    </div>	
	<div id="main">
	
		<div id="left">
		<div id="user">
		<%
		if(session.getAttribute("user") == null)
		{
			 response.sendRedirect("index.jsp");

		}else{
		%>
		  <p> Welcome <%=((UserBean)session.getAttribute("user")).getName()%></p>		   
		   <a href="logOut.do">log Out</a>
		<%} %>

		</div>
		<div id="cart">
		
		
		</div>
		</div>
		<div id="right">
		<%! int from = 0; %>
		  <% Map<Integer,PizzaBean> pizzas = Factory.instance().getPizzaHelper().getAllPizzas(); %>	
         <%  from += 5; %>
           <table>
		  <%
		  for(PizzaBean p:pizzas.values()){
		  %> 
		 
		     <form action="add.do">
		     <tr>
		     <label>  <%=p.getName() %> </label>
		     </tr>
		     <label>  <%=p.getName() %> </label>
		      <tr>
		     <input type="checkbox" name="name" value=" <%=p.getName() %> "/> 	
		      </tr>
		      <tr> 
		       <label> quantity: </label>
		     <input type="text" name="quantity" value="0"/> <br>		
		      </tr>
		      <tr>
		      <input type="submit" value="add" /)>
		      </tr>     		     
		     </form>		 		 
	      <%  
		  }
		  %>
		   </table> 	     
		 <a href="showPizza.jsp"> Previous </a> --------  <a href="showPizza.jsp"> Next </a> 
		</div>
    <div class="clear"></div>
    <div id="footer">
   <p>@CopyRight belongs to super pizza </p>
    </div>
</div>


</body>
</html>
